/**
 * Copyright(c) kyle.
 */
package org.example.jvm;

/**
 * 操作符
 *
 * @author kyle
 * @version 1.00.00
 * @since [2020-12-03 11:01]
 * @updateUser [Kyle]
 * @updateRemark [说明本次修改内容]
 * @date [2020-12-03 11:01]
 */
public class Operation {
    public static void main(String[] args) {
        test1();
        test2();
        test3();
        test4();
        test5();
    }

    private static void test1() {
        int i = 8;
        i = i++;
        System.out.println(i);
    }

    private static void test5() {
        int i = 0;
        i = i++ + i++;
        System.out.println(i);
    }

    private static void test2() {
        int i = 8;
        i = ++i;
        System.out.println(i);
    }

    private static void test3() {
        int i = 10;
        i = i++;
        i = i++;
        i = i++;
        i = i++;
        i = i++;
        System.out.println(i);
    }

    private static void test4() {
        int i = 10;
        i = ++i;
        i = ++i;
        i = ++i;
        i = ++i;
        i = ++i;
        System.out.println(i);
    }
}